package com.nbcio.iot.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nbcio.common.mybatis.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("iot_control_record")
public class IotControlRecord extends BaseEntity {

    @TableId(value = "record_id", type = IdType.ASSIGN_ID)
    private Long recordId;

    @TableField("device_id")
    private Long deviceId;

    @TableField("device_code")
    private String deviceCode;

    @TableField("channel")
    private String channel; // MQTT / MODBUS

    @TableField("action")
    private String action; // mqtt-publish / modbus-write-holding

    @TableField("request")
    private String request; // JSON

    @TableField("response")
    private String response; // JSON/文本

    @TableField("status")
    private String status; // SUCCESS / FAIL
} 